<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>餐馆类型增加</title>
<base href="<%=basePath%>">
<link rel="stylesheet" type="text/css"
	href="<%=basePath%>res/tl/js/layui/css/layui.css" media="all">
<style type="text/css">
	body{
		margin:20px 0px;
	}
</style>
</head>
<body>
	<fieldset class="layui-elem-field layui-field-title"
		style="margin-top: 20px;">
		<legend>增加餐馆类型</legend>
	</fieldset>

	<form class="layui-form" action="<%=basePath%>merchantType/save" method="post">
		<div class="layui-form-item">
			<div class="layui-inline">
				<label class="layui-form-label">类型名称</label>
				<div class="layui-input-inline">
					<input type="text" name="type_name" id="typeName" required
						lay-verify="required" placeholder="类型名称" autocomplete="off" maxlength="10"
						class="layui-input">
				</div>
			</div>
			<div class="layui-inline">
				<label class="layui-form-label">操作人</label>
				<div class="layui-input-inline">
					<input type="text" name="oper" id="oper" required
						lay-verify="required" placeholder="操作人" maxlength="9"
						autocomplete="off" class="layui-input">
				</div>
			</div>
			
		</div>
		
		<div class="layui-form-item">
			<div class="layui-inline">
				<label class="layui-form-label">是否有效</label>
				<div class="layui-input-inline">
					<select name="isva" lay-verify="required" lay-search="" id="isva">
						<option value="">直接选择或搜索选择</option>
						<option value="0">无效</option>
						<option value="1">有效</option>
					</select>
				</div>
			</div>

			<div class="layui-inline">
				<label class="layui-form-label">排序</label>
				<div class="layui-input-inline">
					<input type="number" name="sort" id="sort" required
						lay-verify="required" placeholder="排序" maxlength="18"
						autocomplete="off" class="layui-input">
				</div>
			</div>
		</div>

		<div class="layui-form-item">
			<div class="layui-input-block">
				<input type="submit" class="layui-btn" lay-submit=""
					lay-filter="Add" value="立即增加">
				<button type="reset" class="layui-btn layui-btn-primary">重置</button>
			</div>
		</div>
	</form>
	<script src="<%=basePath%>res/tl/js/layui/layui.js" charset="utf-8"></script>
	<script type="text/javascript">
		
		layui.use('form', function(){
			  var form = layui.form
			  ,layer = layui.layer
			  ,$ = layui.$;
			  
			  form.on('submit(Add)',function(){
				  parent.location.reload(); // 父页面刷新
			  });

			});
	</script>
</body>
</html>